<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of ccvBowGetWordsClean</title>
  <meta name="keywords" content="ccvBowGetWordsClean">
  <meta name="description" content="CCVBOWGETWORDSCLEAN cleans memory after computing word quantizations">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">caltech-image-search</a> &gt; ccvBowGetWordsClean.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for caltech-image-search&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>ccvBowGetWordsClean
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>CCVBOWGETWORDSCLEAN cleans memory after computing word quantizations</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function ccvBowGetWordsClean(gws) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> CCVBOWGETWORDSCLEAN cleans memory after computing word quantizations
 
 INPUTS
 ------
 gws     - the GetWords strcture to use, output from ccvBowGetWordsInit

 OUTPUTS
 -------

 See also <a href="ccvBowGetDict.html" class="code" title="function [words, nwords] = ccvBowGetDict(data, labels, locs, nwords, type, cluster,tparams, cparams, init, dfile)">ccvBowGetDict</a></pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="ccvHkmClean.html" class="code" title="function ccvHkmClean(hkm)">ccvHkmClean</a>	CCVHKMCLEAN clears the memory for teh input hkm</li><li><a href="ccvKdtClean.html" class="code" title="function ccvKdtClean(kdt)">ccvKdtClean</a>	CCVKDTCLEAN cleans the memory for the input kd-tree</li><li><a href="ccvLshClean.html" class="code" title="function ccvLshClean(lsh)">ccvLshClean</a>	CCVLSHCLEAN cleans the input lsh</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="DEMO.html" class="code" title="function DEMO">DEMO</a>	DEMO a demo script to show typical usage</li></ul>
<!-- crossreference -->

<h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="#_sub1" class="code">function cleanDict(dict, cluster)</a></li></ul>

<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function ccvBowGetWordsClean(gws)</a>
0002 <span class="comment">% CCVBOWGETWORDSCLEAN cleans memory after computing word quantizations</span>
0003 <span class="comment">%</span>
0004 <span class="comment">% INPUTS</span>
0005 <span class="comment">% ------</span>
0006 <span class="comment">% gws     - the GetWords strcture to use, output from ccvBowGetWordsInit</span>
0007 <span class="comment">%</span>
0008 <span class="comment">% OUTPUTS</span>
0009 <span class="comment">% -------</span>
0010 <span class="comment">%</span>
0011 <span class="comment">% See also ccvBowGetDict</span>
0012 <span class="comment">%</span>
0013 
0014 <span class="comment">% Author: Mohamed Aly &lt;malaa at vision d0t caltech d0t edu&gt;</span>
0015 <span class="comment">% Date: October 6, 2010</span>
0016 
0017 
0018 <span class="keyword">switch</span> gws.type
0019   <span class="comment">%flat dictionary</span>
0020   <span class="keyword">case</span> <span class="string">'flat'</span>
0021     <span class="comment">%cluster</span>
0022     <a href="#_sub1" class="code" title="subfunction cleanDict(dict, cluster)">cleanDict</a>(gws.dict, gws.cluster);
0023     
0024   <span class="comment">%per-class</span>
0025   <span class="keyword">case</span> <span class="string">'per-class'</span>
0026     <span class="keyword">for</span> c=1:length(gws.dict), <a href="#_sub1" class="code" title="subfunction cleanDict(dict, cluster)">cleanDict</a>(gws.dict{c}, gws.cluster); <span class="keyword">end</span>;
0027       
0028     
0029 
0030 <span class="keyword">end</span>; <span class="comment">%switch type</span>
0031 
0032 
0033 
0034 
0035 <span class="comment">% -----------------------------------------------------------------------</span>
0036 <span class="comment">% clusters the input data</span>
0037 <a name="_sub1" href="#_subfunctions" class="code">function cleanDict(dict, cluster)</a>
0038 
0039 <span class="keyword">switch</span> cluster
0040   <span class="keyword">case</span> <span class="string">'akmeans'</span>
0041     <a href="ccvKdtClean.html" class="code" title="function ccvKdtClean(kdt)">ccvKdtClean</a>(dict);    
0042     
0043   <span class="keyword">case</span> <span class="string">'lsh'</span>
0044     <a href="ccvLshClean.html" class="code" title="function ccvLshClean(lsh)">ccvLshClean</a>(dict.lsh);
0045     
0046   <span class="keyword">case</span> <span class="string">'xkmeans'</span>
0047     <a href="ccvLshClean.html" class="code" title="function ccvLshClean(lsh)">ccvLshClean</a>(dict.lsh);
0048     
0049   <span class="keyword">case</span> <span class="string">'hkmeans'</span>
0050     <a href="ccvHkmClean.html" class="code" title="function ccvHkmClean(hkm)">ccvHkmClean</a>(dict);
0051     
0052 <span class="keyword">end</span>; <span class="comment">%switch cluster</span></pre></div>
<hr><address>Generated on Fri 05-Nov-2010 19:46:04 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>